package com.jkt.rms.business.base;

import java.io.Serializable;
import java.sql.Timestamp;


/**
 * This is an object that contains data related to the app_role table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="app_role"
 */
public abstract class BaseAppRole  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String PROP_NAME = "name";
	public static final String PROP_LOGIN_I_D = "loginID";
	public static final String PROP_ROLE_CODE = "roleCode";
//	public static final String PROP_E_MAIL = "eMail";
	public static final String PROP_UPDATED_DATE = "updatedDate";
	public static final String PROP_CREATED_BY = "createdBy";
	public static final String PROP_PASSWORD = "password";
	public static final String PROP_ID = "id";
	public static final String PROP_UPDATED_BY = "updatedBy";
	public static final String PROP_CREATED_DATE = "createdDate";


	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private int id;

	// fields
	private String loginID;
	private String name;
	private String password;
//	private String eMail;
	private String roleCode;
	private String createdBy;
	
	private Timestamp createdDate;
	private String updatedBy;
	private Timestamp updatedDate;


	// constructors
	public BaseAppRole () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAppRole (int id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAppRole (
		int id,
		String loginID,
		String name,
		String password,
//		String eMail,
		String roleCode,
		String createdBy,
		Timestamp createdDate,
		String updatedBy,
		Timestamp updatedDate
	) {

		this.setId(id);
		this.setLoginID(loginID);
		this.setName(name);
		this.setPassword(password);
//		this.setEMail(eMail);
		this.setRoleCode(roleCode);
		this.setCreatedBy(createdBy);
		this.setCreatedDate(createdDate);
		this.setUpdatedBy(updatedBy);
		this.setUpdatedDate(updatedDate);
		
		initialize();
	}

	protected void initialize () {}



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="app_role_id"
     */
	public int getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (int id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}


	/**
	 * Return the value associated with the column: login_id
	 */
	public String getLoginID () {
		return loginID;
	}

	/**
	 * Set the value related to the column: login_id
	 * @param loginID the login_id value
	 */
	public void setLoginID (String loginID) {
		this.loginID = loginID;
	}


	/**
	 * Return the value associated with the column: name
	 */
	public String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (String name) {
		this.name = name;
	}


	/**
	 * Return the value associated with the column: password
	 */
	public String getPassword () {
		return password;
	}

	/**
	 * Set the value related to the column: password
	 * @param password the password value
	 */
	public void setPassword (String password) {
		this.password = password;
	}


	/**
	 * Return the value associated with the column: e_mail
	 */
	/*public String getEMail () {
		return eMail;
	}

	*//**
	 * Set the value related to the column: e_mail
	 * @param eMail the e_mail value
	 *//*
	public void setEMail (String eMail) {
		this.eMail = eMail;
	}
*/

	/**
	 * Return the value associated with the column: role_code
	 */
	public String getRoleCode () {
		return roleCode;
	}

	/**
	 * Set the value related to the column: role_code
	 * @param roleCode the role_code value
	 */
	public void setRoleCode (String roleCode) {
		this.roleCode = roleCode;
	}


	

	/**
	 * Return the value associated with the column: created_date
	 */
	public Timestamp getCreatedDate () {
		return createdDate;
	}

	/**
	 * Set the value related to the column: created_date
	 * @param createdDate the created_date value
	 */
	public void setCreatedDate (Timestamp createdDate) {
		this.createdDate = createdDate;
	}


	/**
	 * Return the value associated with the column: updated_by
	 */
	public String getUpdatedBy () {
		return updatedBy;
	}

	/**
	 * Set the value related to the column: updated_by
	 * @param updatedBy the updated_by value
	 */
	public void setUpdatedBy (String updatedBy) {
		this.updatedBy = updatedBy;
	}


	/**
	 * Return the value associated with the column: updated_date
	 */
	public Timestamp getUpdatedDate () {
		return updatedDate;
	}

	/**
	 * Set the value related to the column: updated_date
	 * @param updatedDate the updated_date value
	 */
	public void setUpdatedDate (Timestamp updatedDate) {
		this.updatedDate = updatedDate;
	}


	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	

	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.base.BaseAppRole)) return false;
		else {
			com.jkt.rms.business.base.BaseAppRole mObj = (com.jkt.rms.business.base.BaseAppRole) obj;
			return (this.getId() == mObj.getId());
		}
	}


	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			return (int) this.getId();
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

}